<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/commonLayout.xhtml">
    <ui:define name="head">
        <title>Nuevo Usuario</title>
        <script type="text/javascript">
            $(function() {
                $("#hnuser").addClass("active");
            });
        </script>
        <style>
            .sup {
                top: -3px;
                position: relative;
            }
        </style>
    </ui:define>
    <ui:define name="content" >
        <div class="row-fluid" align="center" style="margin-top: 50px">
            <div style="width: 270px" align="left">   
                <h:form class="well">

                    <h3><h:outputText value="#{msgs.nuevoUsuario}"/></h3><br/>
                    <label><h:outputText value="#{msgs.nombre}: "/></label>
                    <h:inputText value="#{newUser.nombre}" required="true"/>
                    <label><h:outputText value="#{msgs.email}: "/></label>
                    <h:inputText value="#{newUser.mail}" required="true"/>
                    <label><h:outputText value="#{msgs.pass}: "/></label>
                    <p:password   value="#{newUser.password}" promptLabel="#{msgs.introducePassSegura}" 
                                  weakLabel="#{msgs.debil}" goodLabel="#{msgs.buena}" strongLabel="#{msgs.fuerte}" label="#{msgs.introducePassSegura}" required="true"/>
                    <br/><br/>
                    <h:panelGrid columns="2">
                        <h:selectBooleanCheckbox style="margin-right: 5px" value="#{newUser.administrador}"/>
                        <h:outputText value="#{msgs.admin}"/>
                    </h:panelGrid>
                    <br/>
                    <h:commandButton class="btn btn-primary" style="margin-right: 5px" value="#{msgs.registrar}" action="#{newUser.registrar()}"/> 
                    <h:outputLink class="btn sup" value="#{root}index.jsf"> 
                        <h:outputText value="#{msgs.volver}"/>
                    </h:outputLink>
                </h:form>


            </div><!--/span-->
        </div><!--/row-->
    </ui:define>
</ui:composition>
